﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using System.Threading;

class FileChangeWatcher
{

    static void File_Change(object sender, FileSystemEventArgs args)
    {
        using (var reader = new StreamReader(args.FullPath, true ))
        {
            string filetoEnd = reader.ReadToEnd();
            Console.WriteLine(filetoEnd);
        }
    }
    static void Main()
    {
        FileSystemWatcher watcher = new FileSystemWatcher(@"C:\TEST", "test.txt");
        watcher.EnableRaisingEvents = true;
        watcher.Changed += new FileSystemEventHandler(File_Change);
        Console.ReadKey();



    }
}

